<template>
    <!-- <h1>{{ title1 }}</h1>
    <h2>Hello,{{ msg }}!</h2> -->
    <input type="button" :value="content" @click="xx">
    <br>
    <div>
        <h1>用户信息</h1>
        <span>用户名:{{ name }}</span>
        <br>
        <span>邮箱:{{ email }}</span>
        <br>
        <input type="button" value="发送用户信息" @click="$emit('push')">
        <div v-if="status">
            <h1>接收到的用户信息</h1>
            <span>用户名:{{ name }}</span>
            <br>
            <span>邮箱:{{ email }}</span>
        </div>
    </div>
</template>
<script setup>
import { ref } from 'vue';
let count = ref(0)
let content = ref(`点击次数${count.value}`)
defineProps(['name', 'email', 'status', 'title1', 'title2', 'text', 'msg', 'num']);
const emit = defineEmits(['push', 'xx', 'home', 'profile', 'settings']);
function xx() {
    count.value++
    content.value = `点击次数${count.value}`
    emit('xx', count.value)
}

</script>